package msb.dongbao.geverator.study;

public class Point {
    float x;
    float y;
    public Point(float x,float y){
        this.x = x;
        this.y = y;
    }
    public Point(){
        this(3f,5);
        this.x = x;
        this.y = y;
    }
    public void setX(float x){
        this.x = x;
    }
    public void setY(float y){
        this.y = y;
    }
    public void setXAndY(float x,float y){
        this.x = x;
        this.y = y;
    }
    public double getTowPointDistance(Point newPoint){
        double distance = Math.sqrt((this.x-newPoint.x)*(this.x-newPoint.x)+(this.y-newPoint.y)*(this.y-newPoint.y));
        return distance;
    }
}
